<div id="panel">
<?php 
		if (isset($_SESSION['authPassed']))
		{
?>
			<div class="tipclass" id="tip"  >
				<span>欢迎回来,<a href='?p=viewUser'><?php echo $_SESSION['userName']; ?></a>!</span>
			
				<span><a href="?p=logout" class="button">退出</a></span>
			</div>
			
			<div id="mainMenu">
				<ul class="boxList">
					<li><a href='?p=viewUser'>我的资料</a></li>
					<li><a href='?p=editPwd'>修改密码</a></li>
					<li><a href='?p=getInviteCode'>获取邀请码</a></li>
					<li><a href='?p=viewMessage'>收件箱</a></li>
					<li><a href='?p=logout'>退出</a></li>
				</ul>
			</div>
<?php
		}
		else 
		{
?>
			<div class="sign-in">
				<div class="signin-box">
  					<p>登录</p>
 					<form id="loginForm" action="?p=login" method="post">
  
						<div class="userName-div">
							<label for="userName"><span class="username-label">用户名</span></label>
							<input type="text"  name="userName" id="username" />
						</div>
						<div class="passwd-div">
							<label for="Passwd"><span class="passwd-label">密码</span></label>
							<input type="password" name="userPwd" id="Passwd"/>
						</div>
						<input type="submit" class="button-submit" name="signIn" id="signIn" value="登录"/>
					</form>
					<a href="?p=reg">没有账号？</a>
				</div>
    		</div>
<?php
		}
?>
</div>
